Program Transformation with Reflection and Aspect-Oriented Programming
نویسنده
چکیده
A meta-programming technique known as reflection can be regarded as a sophisticated programming interface for program transformation. It allows software developers to implement various useful program transformation without serious efforts. Although the range of program transformation enabled by reflection is quite restricted, it covers a large number of interesting applications. In particular, several nonfunctional concerns found in web-application software, such as distribution and persistence, can be implemented with program transformation by reflection. Furthermore, a recently emerging technology known as aspect-oriented programming (AOP) provides better and easier programming interface than program transformation does. One of the roots of AOP is reflection and thus this technology can be regarded as an advanced version of reflection. In this tutorial, we will discuss basic concepts of reflection, such as compile-time reflection and runtime reflection, and its implementation techniques. The tutorial will also cover connection between reflection and aspect-oriented programming.
منابع مشابه
A Calculus of Untyped Aspect-Oriented Programs
Aspects have emerged as a powerful tool in the design and development of systems, allowing for the encapsulation of program transformations. The dynamic semantics of aspects is typically specified by appealing to an underlying object-oriented language via a compiler transformation known as weaving. This treatment is unsatisfactory for several reasons. Firstly, this semantics violates basic modu...
متن کاملIs Composition of Metaobjects = Aspect Oriented Programming
This paper proposes to implement aspects as metaobjects and using run time aspect weaving. The metaobjects are metaobjects as defined in computational reflection and can be exchanged dynamically at run time. In contract to computational reflection, where only one metaobject exist, we have extended the architecture to allow multiple metaobjects and composition.
متن کاملFlexible metaprogramming and AOP in Java
Advanced programming techniques such as metaprogramming and computational reflection, as well as the more recent paradigm of aspect-oriented programming (AOP), serve important objectives of software engineering such as modularization and adaptability. In this tool presentation paper, we briefly overview this area and present Reflex, a tool for flexible metaprogramming and AOP in Java. Based on ...
متن کاملAspect-Oriented Programming using Reflection
What infrastructure is needed to support aspect-oriented software development? To the programmer, we must supply aspect-oriented (sub)languages that are based on the constructs and basic syntax that the programmer is most familiar with, as well as facilities for reifying and manipulating the cross-cutting features of immediate concern. At the implementation level, the aspect specifications must...
متن کاملReflecting on Adaptive Distributed Monitoring
Metaprogramming and computational reflection are two related concepts that allow a program to inspect and possibly modify itself while running. Although the concepts have been explored by researchers for some time, a form of metaprogramming, namely aspect-oriented programming, is now being used by some practitioners. This paper is an attempt to understand the limitations of different forms of c...
متن کامل